function [x] = Selection(pop)
global SELECTION_METHOD POP_SIZE K PRECISION u p q a_acum;

%primero hay que calcular las aptitudes
CalculateAptitudes(pop, POP_SIZE);

switch SELECTION_METHOD
    case 'ELITE'
        x(:,:) = SelectKElite(K, POP_SIZE, pop);
    case 'RESTOS'
        x(:,:) = SelectKRestos(K, POP_SIZE, pop);
    case 'ELITE_UNIVERSAL'
    case 'RULETA'
    otherwise %RANDOM
        x(:,:) = SelectKRandom(K, POP_SIZE, pop);
end
    



